/*
                  Player Class Definition
*/

#ifndef PLAYER_H
#define PLAYER_H

#include "SDL/SDL.h"
#include <string>
#include <queue>

#include "Snake.h"
#include "Mapping/Map.h"

using namespace std;

class Player
{
    public:
        Player();
        ~Player();

        int Initialise(Point Position, int iNewWidth, int iNewHeight, int iNewDirection, int iSize);

        void setName(const string& strNewName);
        string getName();

        Snake& getSnake();

        SDL_Rect getPlayerRect();

        Point getPosition();

        void Draw(SDL_Surface *surface);

        void Move(Map& currentMap);

        bool isCPU();
        void setIsCPU(const bool& bNewVal);

        int getTargetFood();
        void setTargetFood(const int& iNewTarget);

        bool getNeedsNewPath();
        void setNeedsNewPath(bool bNewVal);

        queue<int> getPath();
        void setPath(queue<int> NewPath);
        int getNextMove();

        void AddScore(const int& iAmount);
        void setScore(const int& iNewScore);
        int getScore();

        void AddKills(const int& iAmount);
        void setKills(const int& iNewKills);
        int getKills();

        void AddDeaths(const int& iAmount);
        int getDeaths();
        void setDeaths(const int& iNewDeaths);

        long getTotalScore();

        int Reset(Point Position, int iNewDirection, int iSize);

        int getPersonality();

    private:
        string strName;
        Snake playerSnake;
        bool bIsCPU;
        int iTargetFood;
        bool bNeedsNewPath;
        queue<int> Path;
        SDL_Surface *t;

        int iScore, iKills, iDeaths;
        long iTotalGameScore;
        int iPersonality;
};

#endif
